<?php
  require_once('tpl/header.php');
?>

  <form class="form-horizontal" action="doVideoAdd.php" method="post" enctype="multipart/form-data">
    <div class="form-group">
      <label for="inpputnamel3" class="col-md-2 control-label">视频名称</label>
      <div class="col-md-5">
        <input type="text" class="form-control" id="inputnamel3" name="videoname" placeholder="视频名称">
      </div>
    </div>

    <div class="form-group">
      <label for="inputvideotype3" class="col-md-2 control-label">视频类型</label>
      <div class="col-md-5">
      	<?php 
      	require("inc_admin.php");
      	connect();
      	$sql="select * from videotype";
      	$result=mysql_query($sql);
      	// mysql_fetch_assoc每次取一条记录
      	 ?>
	      <select class="form-control" name="videotype">
	        	<?php 
	        	while ($row=mysql_fetch_assoc($result)) 
	        	{
	        	?>
				      <option value="<?php echo $row["tid"] ?>"><?php echo $row["typename"]; ?></option>
				<?php 
				  }
				?>
			</select>
      </div>
    </div>


    <div class="form-group">
      <label for="inputposter3" class="col-md-2 control-label">视频海报</label>
      <div class="col-md-5">
        <input type="file" id="inputPassword3" name="pic" placeholder="视频海报">
      </div>
    </div>


  <div class="form-group">
      <label for="inputInformation" class="col-md-2 control-label">视频简介</label>
      <div class="col-md-5">
        <textarea name="intro" cols="80" rows="5"></textarea> 
      </div>
    </div>


    <div class="form-group">
      <label for="inputEmail" class="col-md-2 control-label">下载地址</label>
      <div class="col-md-5">
        <input type="text" class="form-control" id="inputBirthdate" name="address" placeholder="下载地址">
      </div>
    </div>


    <div class="form-group">
      <div class="col-md-offset-2 col-md-10">
        <input type="submit" value="添加" class="btn btn-default">
        <input type="reset" value="重置" class="btn btn-default">
      </div>
  </div>
</form>


<?php
  require_once('tpl/footer.php');
?>